package com.sbpm.crmbpm.client.services;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.sbpm.crmbpm.shared.data.client.Company;
import com.sbpm.crmbpm.shared.data.client.Segment;
import com.sencha.gxt.data.shared.loader.PagingLoadResult;

import java.util.List;

public interface CompanyManagementAsync
{
    void findCompanies( String name, String legalName, String inn, String ogrn, String kpp, Segment segment, AsyncCallback<List<Company>> callback );

    void createCompany( Company company, AsyncCallback<Long> callback );

    void findById( Long id, AsyncCallback<Company> callback );

    void findCompanyWithAllAttributes( Long id, AsyncCallback< Company > callback );

    void updateCompany( Company company, AsyncCallback callback );

    void saveCompany( Company company, AsyncCallback callback );

    void findCompanies( String value, int offset, int limit, AsyncCallback<PagingLoadResult<Company> > callback );
}
